projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d122153
)
Pacify GCC 7 with -Wformat-overflow
author
Ken Brown
<kbrown@cornell.edu>
Sat, 21 Jul 2018 16:15:22 +0000
(12:15 -0400)
committer
Ken Brown
<kbrown@cornell.edu>
Sat, 21 Jul 2018 16:18:45 +0000
(12:18 -0400)
* src/w32term.c (x_draw_glyphless_glyph_string_foreground):
Force sprintf to write at most 6 bytes, excluding the
terminating null byte.
src/w32term.c
patch
|
blob
|
history
diff --git
a/src/w32term.c
b/src/w32term.c
index ff0d2bf5ddb11f869b0e00f2df596688bc82d4f2..0ae173a876bc9406f942adab6940d4f39f680879 100644
(file)
--- a/
src/w32term.c
+++ b/
src/w32term.c
@@
-1476,7
+1476,7
@@
x_draw_glyphless_glyph_string_foreground (struct glyph_string *s)
{
sprintf ((char *) buf, "%0*X",
glyph->u.glyphless.ch < 0x10000 ? 4 : 6,
- (unsigned int) glyph->u.glyphless.ch);
+ (unsigned int) glyph->u.glyphless.ch
& 0xffffff
);
str = buf;
}